#!/usr/bin/env node

//10. spawn 进程分离

const cp = require('child_process'),

console.log('father pid:',process.pid);

const child = cp.spawn('node',['03-child.js'],{stdio:['0,1,2'],detched:true});
//child.stdout.pipe(process.stdout)

setTimeout(()=>{
  console.log('father is exit');
  process.exit();
},5000)
  

